Skip to content

Constrain NetworkTimeout on IMDS calls from DefaultAzureCredential#24328

Merged
schaabs merged 7 commits intoAzure:mainfrom
schaabs:imds-timeout-limit
Oct 1, 2021
Merged

Constrain NetworkTimeout on IMDS calls from DefaultAzureCredential#24328
schaabs merged 7 commits intoAzure:mainfrom
schaabs:imds-timeout-limit

Conversation

@schaabs
Copy link
Copy Markdown

@schaabs schaabs commented Sep 29, 2021

Changes to our IMDS discovery model have regressed the perfomance of the DefaultAzureCredential on certain platforms where the IMDS endpoint is not available. This change introduces an internal setting to limit the NetworkTimeout on our initial IMDS calls.

The limit is 1 second the same as the original limit which was put on establishing an socket connection in the previous discovery model. If a response is received from the IMDS endpoint the limit is removed.

@schaabs schaabs requested a review from christothes September 29, 2021 23:09
@ghost ghost added the Azure.Identity label Sep 29, 2021
Comment thread sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs
Comment thread sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs
Comment thread sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs Outdated
Comment thread sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs Outdated
Comment thread sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs
Comment thread eng/Packages.Data.props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants